package com.xique.door.api;


import com.xique.common.core.constant.ServiceNameConstants;
import com.xique.common.core.domain.R;
import com.xique.door.api.factory.RemoteAppLoginLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author shd
 * @create 2021/7/20 16:12
 */
@FeignClient(contextId = "RemoteAppLoginLogService", value = ServiceNameConstants.DOOR_BIZ_SERVICE, fallbackFactory = RemoteAppLoginLogFallbackFactory.class)
public interface RemoteAppLoginLogService {

    /**
     * 保存访问记录
     *
     * @param username 用户名称
     * @param status 状态
     * @param message 消息
     * @param platform 来源
     * @return 结果
     */
    @PostMapping("log/saveLoginInfo")
    R<Boolean> saveLoginLog(@RequestParam("username") String username,
                             @RequestParam("status") String status,
                             @RequestParam("message") String message,
                             @RequestParam("platform") String platform);
}
